﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

public class IndustrialDistrict : District
{
    public IndustrialDistrict(City city)
        : base(DistrictType.Industrial, city)
    {
    }

    protected override bool IsCompleteDistrict(Dictionary<Building.BuildingType, int> typesInDistrict)
    {
        bool hasFactory = typesInDistrict.ContainsKey(Building.BuildingType.Factory);
        bool hasTextile = typesInDistrict.ContainsKey(Building.BuildingType.Textiles);
        bool hasMining = typesInDistrict.ContainsKey(Building.BuildingType.Mining);
        bool hasLumber = typesInDistrict.ContainsKey(Building.BuildingType.Lumber);
        bool hasWarehouses = typesInDistrict.ContainsKey(Building.BuildingType.Warehouse);
        bool hasFuel = typesInDistrict.ContainsKey(Building.BuildingType.Fuel);

        return hasFactory && hasTextile && hasMining && hasLumber && hasWarehouses && hasFuel;
    }

    protected override bool IsValidBuildingType(Building.BuildingType buildingType)
    {
        if (buildingType == Building.BuildingType.Factory) return true;
        if (buildingType == Building.BuildingType.Textiles) return true;
        if (buildingType == Building.BuildingType.Mining) return true;
        if (buildingType == Building.BuildingType.Lumber) return true;
        if (buildingType == Building.BuildingType.Warehouse) return true;
        if (buildingType == Building.BuildingType.Fuel) return true;

        return false;
    }

    protected override float GetDistrictScore(List<Building> buildings)
    {
        return 20;
    }
}
